<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>fixedFluxPressure 边界条件 | Giskard&#39;s CFD Learning Tricks</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="本篇说说我对 fixedFluxPressure 边界条件的理解。">
<meta property="og:type" content="article">
<meta property="og:title" content="fixedFluxPressure 边界条件">
<meta property="og:url" content="http://xiaopingqiu.github.io/2016/08/21/fixedFluxPressure/index.html">
<meta property="og:site_name" content="Giskard's CFD Learning Tricks">
<meta property="og:description" content="本篇说说我对 fixedFluxPressure 边界条件的理解。">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="fixedFluxPressure 边界条件">
<meta name="twitter:description" content="本篇说说我对 fixedFluxPressure 边界条件的理解。">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

##ga('create', '[object Object]', 'auto');
ga('create', 'UA-62501686-1', 'auto');
ga('send', 'pageview');

</script>
<!-- End Google Analytics -->


</head>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Giskard&#39;s CFD Learning Tricks</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">CFD and Scientific Computing</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
          <a class="main-nav-link" href="/atom.xml">Rss</a>
        
          <a class="main-nav-link" href="/about">About</a>
        
      </nav>
      <nav id="sub-nav">
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="q" value="site:http://xiaopingqiu.github.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-fixedFluxPressure" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2016/08/21/fixedFluxPressure/" class="article-date">
  <time datetime="2016-08-21T06:47:12.000Z" itemprop="datePublished">2016-08-21</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/OpenFOAM/">OpenFOAM</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      fixedFluxPressure 边界条件
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>本篇说说我对 fixedFluxPressure 边界条件的理解。</p>
<a id="more"></a>
<p>先来看 OpenFOAM-2.2.x 里的<br><figure class="highlight lasso"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">class fixedFluxPressureFvPatchScalarField</span><br><span class="line">:</span><br><span class="line">    <span class="keyword">public</span> fixedGradientFvPatchScalarField</span><br><span class="line">&#123;</span><br><span class="line">    <span class="comment">// Private data</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">//- Name of the predicted flux transporting the field</span></span><br><span class="line">        word phiHbyAName_;</span><br><span class="line">        <span class="comment">//- Name of the flux transporting the field</span></span><br><span class="line">        word phiName_;</span><br><span class="line">        <span class="comment">//- Name of the density field used to normalise the mass flux</span></span><br><span class="line">        <span class="comment">//  if neccessary</span></span><br><span class="line">        word rhoName_;</span><br><span class="line">        <span class="comment">//- Name of the pressure diffusivity field</span></span><br><span class="line">        word DpName_;</span><br><span class="line">        <span class="comment">//- Is the pressure adjoint, i.e. has the opposite sign</span></span><br><span class="line">        Switch adjoint_;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span>:</span><br><span class="line"></span><br><span class="line">    <span class="comment">//- Runtime type information</span></span><br><span class="line">    TypeName(<span class="string">"fixedFluxPressure"</span>);</span><br><span class="line">    <span class="attribute">...</span><span class="attribute">...</span></span><br><span class="line">    <span class="attribute">...</span><span class="attribute">...</span></span><br><span class="line">    <span class="comment">//- Update the coefficients associated with the patch field</span></span><br><span class="line">    virtual <span class="literal">void</span> updateCoeffs();</span><br><span class="line">   </span><br><span class="line">    <span class="attribute">...</span><span class="attribute">...</span></span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure></p>
<p>其中 <code>updateCoeffs</code> 函数定义如下：<br><figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br></pre></td><td class="code"><pre><span class="line">void Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs()</span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">if</span> (updated())</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">return</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">const</span> surfaceScalarField&amp; phiHbyA =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;surfaceScalarField&gt;(phiHbyAName_);</span><br><span class="line">    <span class="keyword">const</span> surfaceScalarField&amp; phi =</span><br><span class="line">        <span class="keyword">db</span>().lookupObject&lt;surfaceScalarField&gt;(phiName_);</span><br><span class="line">    fvsPatchField&lt;<span class="keyword">scalar</span>&gt; phiHbyAp =</span><br><span class="line">        patch().patchField&lt;surfaceScalarField, <span class="keyword">scalar</span>&gt;(phiHbyA);</span><br><span class="line">    fvsPatchField&lt;<span class="keyword">scalar</span>&gt; phip =</span><br><span class="line">        patch().patchField&lt;surfaceScalarField, <span class="keyword">scalar</span>&gt;(phi);</span><br><span class="line">    <span class="keyword">const</span> scalarField *DppPtr = NULL;</span><br><span class="line">    <span class="keyword">if</span> (<span class="keyword">db</span>().foundObject&lt;volScalarField&gt;(DpName_))</span><br><span class="line">    &#123;</span><br><span class="line">        DppPtr =</span><br><span class="line">            &amp;patch().lookupPatchField&lt;volScalarField, <span class="keyword">scalar</span>&gt;(DpName_);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">else</span> <span class="keyword">if</span> (<span class="keyword">db</span>().foundObject&lt;surfaceScalarField&gt;(DpName_))</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">const</span> surfaceScalarField&amp; Dp =</span><br><span class="line">            <span class="keyword">db</span>().lookupObject&lt;surfaceScalarField&gt;(DpName_);</span><br><span class="line">        DppPtr =</span><br><span class="line">            &amp;patch().patchField&lt;surfaceScalarField, <span class="keyword">scalar</span>&gt;(Dp);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> (adjoint_)</span><br><span class="line">    &#123;</span><br><span class="line">        gradient() = (phip - phiHbyAp)/patch().magSf()/(*DppPtr);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">else</span></span><br><span class="line">    &#123;</span><br><span class="line">        gradient() = (phiHbyAp - phip)/patch().magSf()/(*DppPtr);</span><br><span class="line">    &#125;</span><br><span class="line">    fixedGradientFvPatchScalarField::updateCoeffs();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>代码的说明如下：</p>
<p>这个边界条件，继承自 <code>fixedGradientFvPatchScalarField</code>，可见它是一个用于压力场的第二类边界条件。其用如下公式来计算边界上的压力梯度：<br>$$<br>\nabla(p) = \frac{\phi_{H/A} - \phi}{|S_f| D_p}<br>$$</p>
<p>在设置边界条件的时候，可以指定 <code>phiHbyA</code>， <code>phi</code> 和 <code>Dp</code> 对应的场，如果不指定，则三个量对应的默认场名分别是 <code>phiHbyA</code>， <code>phi</code> 和 <code>Dp</code>，这时如果你的程序中找不到这三个场，那就将出错了。</p>
<p>这个边界条件可以这样理解：<br>首先来看单相流的情形，比如 <code>icoFoam</code>，半离散化的动量方程为<br>$$<br>AU=H-\nabla p<br>$$<br>即<br>$$<br>\nabla p = H - AU<br>$$<br>在入口处，理论上当计算收敛后，压力梯度应当是0。但是在构建压力方程<br><figure class="highlight lisp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">fvScalarMatrix pEqn</span><br><span class="line"><span class="list">(</span><br><span class="line">   <span class="keyword">fvm</span>:<span class="keyword">:laplacian</span><span class="list">(<span class="keyword">rAU</span>, p)</span> == fvc:<span class="keyword">:div</span><span class="list">(<span class="keyword">phiHbyA</span>)</span></span><br><span class="line">)</span><span class="comment">;</span></span><br></pre></td></tr></table></figure></p>
<p>的时候，速度 $U$ 还没有经过修正，即这里的 $U$ 是预测值，所以，迭代过程中入口压力梯度不一定为零。将入口压力设置为等于 $H/A-U$，有助于提高计算稳定性。<br>从代码角度看，对压力方程而言，需要设置的是 inlet 边界上的 $(\nabla p)_{\bot} \cdot rAU$，<br>$$<br>(\nabla p)_{\bot} \cdot rAU = (\nabla p)_{\bot}/A_f = \frac{1}{A_f}(\nabla p \cdot \vec{n} \cdot |S_f|) = (H/A) \cdot S_f-U\cdot S_f<br>$$<br>设置的边界条件应为<br>$$<br>\nabla p \cdot \vec{n} = \frac{(H/A) \cdot S_f-U\cdot S_f}{\big |S_f \big| \cdot rAU}<br>$$</p>
<p>但实际上，<code>fixedFluxPressureFvPatchScalarField</code> 主要是用于两相流中，以 <code>twoPhaseEulerFoam</code> 为例，<br>半离散的动量方程为：<br>$$<br>U_{a}=\frac{1}{a_{p,a}}H(U_a)-\frac{\nabla p}{a_{p,a}\rho_a}+\frac{\alpha_b}{ a_{p,a} \rho_a} K U_b +\frac{1}{a_{p,a}} g<br>$$</p>
<p>$$<br>U_{b}=\frac{1}{a_{p,b}}H(U_b)-\frac{\nabla p}{a_{p,b}\rho_b}+\frac{\alpha_a}{ a_{p,b} \rho_b} K U_a +\frac{1}{a_{p,b}} g<br>$$</p>
<p>对 $U_a$ 项两边同时乘以 $\alpha_a$ ，$U_b$ 项两边同时乘以 $\alpha_b$ ，然后合并起来，得到<br>$$<br>\begin{align*}<br>\Big(\frac{\alpha_a}{a_{p,a}\rho_a}+ \frac{\alpha_b}{a_{p,b}\rho_b}\Big)\nabla p &amp; = \alpha_a \Big[\frac{1}{a_{p,a}}H(U_a)+\frac{\alpha_b}{ a_{p,a} \rho_a} K U_b +\frac{1}{a_{p,a}} g\Big] + \alpha_b \Big[ \frac{1}{a_{p,b}}H(U_b)+\frac{\alpha_a}{ a_{p,b} \rho_b} K U_a +\frac{1}{a_{p,b}} g\Big] \\<br>&amp; - (\alpha_a U_a + \alpha_b U_b)<br>\end{align*}<br>$$</p>
<p>转换成界面通量形式，则<br>$$<br>D_p \nabla p \cdot S_f = \alpha_a \cdot phiHbyA1 + \alpha_b \cdot phiHbyA2 - (\alpha_a \cdot phi1 + \alpha_b \cdot phi2) = phiHbyA - phi<br>$$</p>
<p>于是得到压力的边界条件为<br>$$<br>\nabla p \cdot \vec{n} = \frac{phiHbyA - phi}{Dp \cdot \big|S_f\big|}<br>$$<br>这大概就是 <code>fixedFluxPressureFvPatchScalarField</code> 的物理含义吧。</p>
<p>在 OpenFOAM-2.3.x 以后，<code>fixedFluxPressureFvPatchScalarField</code> 做了修改，不需要指定 <code>Dp</code> 等这些量的值，而是在求解器中直接指定压力梯度。<br>比如 <code>twoPhaseEulerFoam</code> 中<br><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">setSnGrad&lt;fixedFluxPressureFvPatchScalarField&gt;</span><br><span class="line">   (</span><br><span class="line">       p.boundaryField(),</span><br><span class="line">       (</span><br><span class="line">           phiHbyA.boundaryField()</span><br><span class="line">         - mrfZones.relative</span><br><span class="line">           (</span><br><span class="line">               alpha1f.boundaryField()</span><br><span class="line">              *(mesh.Sf().boundaryField() &amp; U1.boundaryField())</span><br><span class="line">             + alpha2f.boundaryField()</span><br><span class="line">              *(mesh.Sf().boundaryField() &amp; U2.boundaryField())</span><br><span class="line">           )</span><br><span class="line">       )/(mesh.magSf().boundaryField()*rAUf.boundaryField())</span><br><span class="line">   );</span><br></pre></td></tr></table></figure></p>
<p><code>setSnGrad</code> 这个函数的定义在 <code>fixedFluxPressureFvPatchScalarField</code> 中定义：<br><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="keyword">template</span>&lt;<span class="keyword">class</span> GradBC&gt;</span><br><span class="line">    <span class="function"><span class="keyword">inline</span> <span class="keyword">void</span> <span class="title">setSnGrad</span></span><br><span class="line">    <span class="params">(</span><br><span class="line">        volScalarField::GeometricBoundaryField&amp; bf,</span><br><span class="line">        <span class="keyword">const</span> FieldField&lt;fvsPatchField, scalar&gt;&amp; snGrad</span><br><span class="line">    )</span></span><br><span class="line">    </span>&#123;</span><br><span class="line">        forAll(bf, patchi)</span><br><span class="line">        &#123;</span><br><span class="line">            <span class="keyword">if</span> (isA&lt;GradBC&gt;(bf[patchi]))</span><br><span class="line">            &#123;</span><br><span class="line">                refCast&lt;GradBC&gt;(bf[patchi]).updateCoeffs(snGrad[patchi]);<span class="comment">// 调用带一个参数的 updateCoeffs 函数</span></span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 实际调用的是这个函数，这个函数调用完以后，curTimeIndex_ 将等于当前时间步的标签。</span></span><br><span class="line"><span class="keyword">void</span> Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs</span><br><span class="line">(</span><br><span class="line">    <span class="keyword">const</span> scalarField&amp; snGradp</span><br><span class="line">)</span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">if</span> (updated())</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">return</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    curTimeIndex_ = <span class="keyword">this</span>-&gt;db().time().timeIndex();</span><br><span class="line"></span><br><span class="line">    gradient() = snGradp;</span><br><span class="line">    fixedGradientFvPatchScalarField::updateCoeffs();</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 但是，很多其他地方仍然需要不带参数的 updateCoeffs 函数接口。</span></span><br><span class="line"><span class="comment">// 这个函数将不起实质作用，但是，如果在调用这个无参的 updateCoeffs 函数之前，没有先调用带一个参数的 updateCoeffs 函数，</span></span><br><span class="line"><span class="comment">// curTimeIndex_ 也没有更新到当前的时间步标签，那就报错，表明不适合使用这个边界条件。</span></span><br><span class="line"><span class="keyword">void</span> Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs()</span><br><span class="line">&#123;</span><br><span class="line">    <span class="keyword">if</span> (updated())</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="keyword">return</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="keyword">if</span> (curTimeIndex_ != <span class="keyword">this</span>-&gt;db().time().timeIndex())</span><br><span class="line">    &#123;</span><br><span class="line">        FatalErrorIn(<span class="string">"fixedFluxPressureFvPatchScalarField::updateCoeffs()"</span>)</span><br><span class="line">            &lt;&lt; <span class="string">"updateCoeffs(const scalarField&amp; snGradp) MUST be called before"</span></span><br><span class="line">               <span class="string">" updateCoeffs() or evaluate() to set the boundary gradient."</span></span><br><span class="line">            &lt;&lt; <span class="built_in">exit</span>(FatalError);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>因此，显然，从 2.3 开始，只有在求解器中显式地调用带一个参数的 updateCoeffs 函数来指定 p 的边界条件时，该求解器的算例才能使用 <code>fixedFluxPressure</code> 这个边界条件。 </p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://xiaopingqiu.github.io/2016/08/21/fixedFluxPressure/" data-id="cj2lay33x003hkkmb354p1p2a" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Boundary-conditions/">Boundary conditions</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Code-Explained/">Code Explained</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/08/21/ODE/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          OpenFOAM 中求解 ODE 一例
        
      </div>
    </a>
  
  
    <a href="/2016/08/21/ManualDecomposition/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">OpenFOAM 中用手动并行分块的方法</div>
    </a>
  
</nav>

  
</article>


<section id="comments">
  <!-- 多说评论框 start -->
  <div class="ds-thread" data-thread-key="post-fixedFluxPressure" data-title="fixedFluxPressure 边界条件" data-url="http://xiaopingqiu.github.io/2016/08/21/fixedFluxPressure/"></div>
  <!-- 多说评论框 end -->
  <!-- 多说公共JS代码 start (一个网页只需插入一次) -->
  <script type="text/javascript">
  var duoshuoQuery = {short_name:"xiaopingqiu"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
  <!-- 多说公共JS代码 end -->
</section>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/C/">C++</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/DEM/">DEM</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/OpenFOAM/">OpenFOAM</a><span class="category-list-count">44</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Paraview/">Paraview</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/swak4Foam/">swak4Foam</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/test/">test</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/vim/">vim</a><span class="category-list-count">1</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Boundary-conditions/">Boundary conditions</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/">C++</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CentOS/">CentOS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Code-Explained/">Code Explained</a><span class="tag-list-count">29</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LES/">LES</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LIGGGHTS/">LIGGGHTS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ODE/">ODE</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/OpenFOAM/">OpenFOAM</a><span class="tag-list-count">20</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Postprocessing/">Postprocessing</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Preprocessing/">Preprocessing</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/RTS/">RTS</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/TIL/">TIL</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Windows/">Windows</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/fvOptions/">fvOptions</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/groovyBC/">groovyBC</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/paraview/">paraview</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/thermophysicalModels/">thermophysicalModels</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/turbulence-model/">turbulence model</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wall-functions/">wall functions</a><span class="tag-list-count">4</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Boundary-conditions/" style="font-size: 15.56px;">Boundary conditions</a><a href="/tags/C/" style="font-size: 11.11px;">C++</a><a href="/tags/CentOS/" style="font-size: 10px;">CentOS</a><a href="/tags/Code-Explained/" style="font-size: 20px;">Code Explained</a><a href="/tags/LES/" style="font-size: 10px;">LES</a><a href="/tags/LIGGGHTS/" style="font-size: 10px;">LIGGGHTS</a><a href="/tags/ODE/" style="font-size: 10px;">ODE</a><a href="/tags/OpenFOAM/" style="font-size: 18.89px;">OpenFOAM</a><a href="/tags/Postprocessing/" style="font-size: 17.78px;">Postprocessing</a><a href="/tags/Preprocessing/" style="font-size: 11.11px;">Preprocessing</a><a href="/tags/RTS/" style="font-size: 12.22px;">RTS</a><a href="/tags/TIL/" style="font-size: 10px;">TIL</a><a href="/tags/Windows/" style="font-size: 10px;">Windows</a><a href="/tags/fvOptions/" style="font-size: 11.11px;">fvOptions</a><a href="/tags/groovyBC/" style="font-size: 10px;">groovyBC</a><a href="/tags/paraview/" style="font-size: 10px;">paraview</a><a href="/tags/test/" style="font-size: 11.11px;">test</a><a href="/tags/thermophysicalModels/" style="font-size: 14.44px;">thermophysicalModels</a><a href="/tags/turbulence-model/" style="font-size: 16.67px;">turbulence model</a><a href="/tags/vim/" style="font-size: 10px;">vim</a><a href="/tags/wall-functions/" style="font-size: 13.33px;">wall functions</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">五月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/">八月 2016</a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/">六月 2016</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/05/">五月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">四月 2016</a><span class="archive-list-count">12</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">三月 2016</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">十二月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">十一月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">十月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">九月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">八月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">六月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">五月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">四月 2015</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2017/05/12/duoshuoAnnouncement/">多说评论系统将停止提供服务</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewScritps/">Paraview 脚本一例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCamera/">Paraview 中有关 Camera 的操作两例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCustomFilter/">Paraview 中创建 Custom Filter</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewStreamLineOnSlice/">在 Paraview 中画截面上的流线</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 Giskard Q.<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

<script src="//dn-lbstatics.qbox.me/lbservice/busuanzi/2.0/busuanzi.mini.js"/></script>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/atom.xml" class="mobile-nav-link">Rss</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-62501686-1', 'auto');
  ga('send', 'pageview');

</script>

  </div>
<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>